home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-05-01 | 6.9 KB | 331 lines | [TEXT/MPS ] |
- % ---------------------------------------------------------------------------
- % Class MacToolConst.sim
- %
- % Part of the interface to Macintosh Toolbox
- % This file contains the constant definitions from ToolIntf.p
- % and some of the constants in OSintf.p.
- % It is used as parameters to Toolbox routines of most "Tools".
- %
- % 890409/Boris Magnusson
- % Note: Is there a need to split this file in parts ?
- % ---------------------------------------------------------------------------
- class macToolConst;
- begin
- ! -- Thise comes from OSIntf.p ------------ ;
- short integer
- !for Event Manager;
- everyEvent = -1,
- NullEvent = 0,
- mouseDown = 1,
- mouseUp = 2,
- keyDown = 3,
- keyUp = 4,
- autoKey = 5,
- updateEvt = 6,
- diskEvt = 7,
- activateEvt = 8,
- networkEvt = 10,
- driverEvt = 11,
- app1Evt = 12,
- app2Evt = 13,
- app3Evt = 14,
- app4Evt = 15,
-
- ! event mask equates ;
- mDownMask = 2,
- mUpMask = 4,
- keyDownMask = 8,
- keyUpMask = 16,
- autoKeyMask = 32,
- updateMask = 64,
- diskMask = 128,
- activMask = 256,
- networkMask = 1024,
- driverMask = 2048,
- app1Mask = 4096,
- app2Mask = 8192,
- app3Mask = 16384,
- app4Mask = -32768;
-
- !to decipher event message for keyDown events;
- integer
- charCodeMask = 16RFF, !$000000FF;
- keyCodeMask = 16RFF00, !$0000FF00;
- adbAddrMask = 16RFF0000; !$00FF0000;
-
- ! modifiers ;
- short integer
- controlKey = 4096, ! Bit 4 of high byte ;
- optionKey = 2048, ! Bit 3 of high byte ;
- alphaLock = 1024, ! Bit 2 ;
- shiftKey = 512, ! Bit 1 ;
- cmdKey = 256, ! Bit 0 ;
- btnState = 128, ! Bit 7 of low byte is mouse button state ;
-
- activeFlag = 1, ! bit 0 of modifiers for activate event ;
-
- !error for PostEvent;
- evtNotEnb = 1;
-
- ! --------- These comes from ToolIntf.p ------- ;
- Short integer
-
- commandMark = 16R11, !$11;
- checkMark = 16R12, !$12;
- diamondMark = 16R13, !$13;
- appleMark = 16R14, !$14;
-
- systemFont = 0,
- applFont = 1,
- newYork = 2,
- geneva = 3,
- monaco = 4,
- venice = 5,
- london = 6,
- athens = 7,
- sanFran = 8,
- toronto = 9,
- cairo = 11,
- losAngeles = 12,
- times = 20,
- helvetica = 21,
- courier = 22,
- symbol = 23,
- mobile = 24;
- Integer
- propFont = 16R9000, ! $9000;
- prpFntH = 16R9001, ! $9001;
- prpFntW = 16R9002, ! $9002;
- prpFntHW = 16R9003, ! $9003;
-
- fixedFont = 16RB000, ! $B000;
- fxdFntH = 16RB001, ! $B001;
- fxdFntW = 16RB002, ! $B002;
- fxdFntHW = 16RB003, ! $B003;
-
- fontWid = 16RACB0; ! $ACB0;
-
- !for Window Manager;
-
- !window messages;
- short integer
- wDraw = 0,
- wHit = 1,
- wCalcRgns = 2,
- wNew = 3,
- wDispose = 4,
- wGrow = 5,
- wDrawGIcon = 6,
-
- !types of windows;
- dialogKind = 2,
- userKind = 8,
-
- !desk pattern resource ID;
- deskPatID = 16,
-
- !window definition PROCEDURE IDs;
- documentProc = 0,
- dBoxProc = 1,
- plainDBox = 2,
- altDBoxProc = 3,
- noGrowDocProc = 4,
- zoomDocProc = 8,
- zoomNoGrow = 12,
- rDocProc = 16,
-
- !FindWindow Result Codes;
- inDesk = 0,
- inMenuBar = 1,
- inSysWindow = 2,
- inContent = 3,
- inDrag = 4,
- inGrow = 5,
- inGoAway = 6,
-
- !new 128K ROM;
- inZoomIn = 7,
- inZoomOut = 8,
-
- !defProc hit test codes;
- wNoHit = 0,
- wInContent = 1,
- wInDrag = 2,
- wInGrow = 3,
- wInGoAway = 4,
-
- !new 128K ROM;
- wInZoomIn = 5,
- wInZoomOut = 6,
-
- !axis constraints for DragGrayRgn call;
- noConstraint = 0,
- hAxisOnly = 1,
- vAxisOnly = 2,
-
- !for TextEdit;
-
- teJustLeft = 0,
- teJustRight = - 1,
- teJustCenter = 1,
- teForceLeft = -2, !for Arabic fonts, force left justification ;
-
- !for Resource Manager;
-
- !Resource attribute byte;
- resSysHeap = 64, ! System or application heap? ;
- resPurgeable = 32, ! Purgeable resource? ;
- resLocked = 16, ! Load it in locked? ;
- resProtected = 8, ! Protected? ;
- resPreload = 4, ! Load in on OpenResFile? ;
- resChanged = 2, ! Resource changed? ;
-
- mapReadOnly = 128,! Resource file read-only ;
- mapCompact = 64, ! Compact resource file ;
- mapChanged = 32, ! Write map out at update ;
-
- resNotFound = -192, ! Resource not found ;
- resFNotFound = -193, ! Resource file not found ;
- addResFailed = -194, ! AddResource failed ;
- rmvResFailed = -196, ! RmveResource failed ;
- rmvRefFailed = -197, ! RmveReference failed ;
- resAttrErr = -198, ! attribute inconsistent with operation ;
- mapReadErr = -199, ! map inconsistent with operation ;
-
- !ID's for resources provided in sysResDef;
-
- !standard cursor definitions;
- iBeamCursor = 1, !text selection cursor;
- crossCursor = 2, !for drawing graphics;
- plusCursor = 3, !for structured selection;
- watchCursor = 4, !for indicating a long delay;
-
- !icons;
- stopIcon = 0,
- noteIcon = 1,
- cautionIcon = 2,
-
- !patterns;
- sysPatListID = 0, !ID of PAT# which contains 38 patterns;
-
- !for Control Manager;
-
- !control messages;
- drawCntl = 0,
- testCntl = 1,
- calcCRgns = 2,
- initCntl = 3,
- dispCntl = 4,
- posCntl = 5,
- thumbCntl = 6,
- dragCntl = 7,
- autoTrack = 8,
-
- !FindControl Result Codes;
- inButton = 10,
- inCheckbox = 11,
- inUpButton = 20,
- inDownButton = 21,
- inPageUp = 22,
- inPageDown = 23,
- inThumb = 129,
-
- !control definition proc ID's;
- pushButProc = 0,
- checkBoxProc = 1,
- radioButProc = 2,
- scrollBarProc = 16,
-
- useWFont = 8,
-
- !for Dialog Manager;
-
- userItem = 0,
- ctrlItem = 4,
- btnCtrl = 0, ! Low two bits specify what kind of control ;
- chkCtrl = 1,
- radCtrl = 2,
- resCtrl = 3,
-
- statText = 8, ! Static text ;
- editText = 16, ! Editable text ;
- iconItem = 32, ! Icon item ;
- picItem = 64, ! Picture item ;
- itemDisable = 128, ! Disable item if set ;
-
- ok = 1, ! OK button is first by convention ;
- cancel = 2, ! Cancel button is second by convention ;
-
- !for Menu Manager;
-
- noMark = 0, ! mark symbol for MarkItem ;
- textMenuProc = 0,
-
- ! menu defProc messages ;
- mDrawMsg = 0,
- mChooseMsg = 1,
- mSizeMsg = 2,
-
- !for Scrap Manager;
-
- noScrapErr = - 100, !desk scrap isn't initialized;
- noTypeErr = - 102,
-
- !package manager;
- listMgr = 0, !list manager;
- dskInit = 2, !Disk Initializaton;
- stdFile = 3, !Standard File;
- flPoint = 4, !Floating-Point Arithmetic;
- trFunc = 5, !Transcendental FUNCTIONs;
- intUtil = 6, !International Utilities;
- bdConv = 7, !Binary/Decimal Conversion;
-
-
- !************** NEW TOOL CONSTANTS ************;
-
- !Text Edit;
-
- doFont = 1, ! set font (family) number ;
- doFace = 2, ! set character style ;
- doSize = 4, ! set type size ;
- doColor = 8, ! set color ;
- doAll = 15, ! set all attributes ;
- addSize = 16, ! adjust type size ;
-
- !Color Window Manager;
-
- !Window Part Identifiers which correlate color table
- entries with window color table elements;
-
- wContentColor = 0,
- wFrameColor = 1,
- wTextColor = 2,
- wHiliteColor = 3,
- wTitleBarColor = 4,
-
- !Color Control Manager;
-
- !Control Part Identifiers which correlate color table
- entries with control color table elements;
-
- cFrameColor = 0,
- cBodyColor = 1,
- cTextColor = 2,
- cThumbColor = 3,
-
- !Menu Manager;
-
- hMenuCmd = 16R1B, !$1B; !itemCmd == $1B ==> hierarchical menu;
- hierMenu = -1, !a hierarchical menu - for InsertMenu call;
- mPopUpMsg = 4, ! menu defProc messages ;
- mctAllItems = -98, ! search for all Items for the given ID ;
- mctLastIDIndic = -99, ! last color table entry has this in ID field ;
-
- ! Menu Manager Errors ;
-
- dsMBarNFnd = 85,
- dsHMenuFindErr = 86
- ;
-
- end -- Mac Tool Const -- ;
-